package com.fivemin.website_statistics.enums;

public enum ResponseEnum {
    OK(200,"成功"),
    BAD_REQUEST(400, "失败的请求"),
    UNAUTHORIZED(401, "未授权"),
    FORBIDDEN(403, "禁止访问"),
    NOT_FOUND(404, "请求找不到"),
    NOT_ACCEPTABLE(406, "不可访问"),
    CONFLICT(409, "冲突"),
    DB_SAVE_ERROR(5001,"数据库存储异常"),
    PARAMS_BINDING_ERROR(5002,"请求参数异常"),
    ERROR(500, "服务器发生异常");
    private int code;
    private String msg;

    ResponseEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
